package xin.mashibo.wanjiobutest.vo;

import android.os.Parcel;
import android.os.Parcelable;

import com.wanji.etcble.bean.WJStructBean;

/**
 * @author MaShibo
 *         on 2018/3/21
 */
public class CardTransaction extends WJStructBean.CardTransactionRecord implements Parcelable {

    public CardTransaction() {
    }

    protected CardTransaction(Parcel in) {
        onlineSn = in.readString();
        overdrawLimit = in.readString();
        transAmount = in.readString();
        transType = in.readString();
        terminalNo = in.readString();
        transDate = in.readString();
        transTime = in.readString();
    }

    public CardTransaction(WJStructBean.CardTransactionRecord record) {
        onlineSn = record.onlineSn;
        overdrawLimit = record.overdrawLimit;
        transAmount = record.transAmount;
        transType = record.transType;
        terminalNo = record.terminalNo;
        transDate = record.transDate;
        transTime = record.transTime;
    }

    public static final Creator<CardTransaction> CREATOR = new Creator<CardTransaction>() {
        @Override
        public CardTransaction createFromParcel(Parcel in) {
            return new CardTransaction(in);
        }

        @Override
        public CardTransaction[] newArray(int size) {
            return new CardTransaction[size];
        }
    };

    @Override
    public int describeContents() {
        return 0;
    }

    @Override
    public void writeToParcel(Parcel dest, int flags) {
        dest.writeString(onlineSn);
        dest.writeString(overdrawLimit);
        dest.writeString(transAmount);
        dest.writeString(transType);
        dest.writeString(terminalNo);
        dest.writeString(transDate);
        dest.writeString(transTime);
    }


}
